package request.login;

import java.util.Map.Entry;
import java.util.Set;

import org.abacus.client.ui.view.View;
import org.abacus.client.ui.view.login.RoleView;
import org.abacus.model.sys.Role;
import org.eclipse.swt.widgets.Scrollable;

import request.AbstractActionRequest;
import request.ActionRequest;
import request.ActionReturn;

public class RoleRequest extends AbstractActionRequest {

	public RoleRequest() {
		super();
		this.hasNext = false;
	}

	@Override
	public <T> ActionReturn<T> done(Set<Entry<String, Scrollable>> arg0, Class<T> arg1) {
		// T result = this.done(DEFAULT_REQUEST, "/userRole/roles_by_user",
		// arg1);
		T result = null;
		ActionReturn<T> ar = new ActionReturn<T>();
		ar.setResult(result);
		return ar;
	}

	@Override
	public ActionRequest next() {
		return null;
	}

	@Override
	public void done() {
		ActionReturn<Role[]> ar = done(null, Role[].class);
		RoleView roleView = new RoleView();

		Role[] roles = new Role[2];
		roles[0] = new Role();
		roles[0].setName("ss");
		roles[1] = new Role();
		roles[1].setName("理朝阳");
		roleView.setRoles(roles);
		// roleView.setActionRequest(new LoginRequest());
	}

	@Override
	public void done(View view) {

	}

}
